/*****************************************************************************/
/**
*
* @file beep.h
*
* Header file for uiic.c.
* Target device: STM32F103RET6.
*
* <pre>
* MODIFICATION HISTORY:
*
* Ver   Who    Date   	Changes
* ----- ---- ---------- -------------------------------------------------------
* 0.01  abu  01/27/2020 Created
* </pre>
*
*------------------------------------------------------------------------------
* Author:	abu
*					E-mail:	abu_liu@opencores.org
*------------------------------------------------------------------------------
*
******************************************************************************/

/***************************** Include Files *********************************/
#include "bsp_beep.h"

/************************** Function Prototypes ******************************/

/*****************************************************************************/
/**
*
* @brief	Initialise beep.
*
*
* @param	None.
* @param  None.	
*
* @return	None.
*
* @note		None.
*
******************************************************************************/
void beep_init(void)
{
	GPIO_InitTypeDef beep;

	RCC_APB2PeriphClockCmd(BEEP_PORT_CLK, ENABLE);
	
	beep.GPIO_Pin = BEEP_PIN;
	beep.GPIO_Speed = GPIO_Speed_50MHz;
	beep.GPIO_Mode = GPIO_Mode_Out_PP;
	
	GPIO_Init(BEEP_PORT, &beep);
	beep_off();
}

